With increasing development of electronic industries, the current digital cameras usually have anti-vibration functions. Generally, there are several approaches of performing the anti-vibration functions.
A first approach is a mechanical anti-vibration function. A camera lens or a charge coupled device (CCD) of the digital camera is provided with a movable mechanism and a manual detecting device. In a case that the digital camera is slightly subject to vibration during the shooting period, the tiny vibration amount is detected by the manual detecting device. According to the vibration amount, a dynamically reverse compensation is performed on the camera lens or the CCD such that the location of the camera lens relative to the CCD is kept unchanged. By means of the mechanical anti-vibration function, the image captured by the CCD is not blurred. Although the mechanical anti-vibration function is effective for obtaining sharp imaged, there are still some drawbacks. For example, the mechanical structures of the components for performing the mechanical anti-vibration function are very complicated and costly. Consequently, the mechanical anti-vibration function is usually applied to high-level digital cameras.
A second approach uses a high ISO sensitivity setting or a super-high ISO sensitivity setting to perform the anti-vibration function. In a case that the digital camera is subject to vibration during the shooting period, the exposing time of the camera lens will be shortened. That is, an image is captured by the CCD within a very short time. This image is usually not blurred. Since the exposing time of the camera lens is very short, the intensity of the light received by the CCD is insufficient and the image signal generated by the CCD is considerably weak. For solving these drawbacks, the digital camera needs a built-in amplifying circuit to amplify the image signal into a sharp image. Generally, most commercial digital cameras use the second approach to achieve the anti-vibration purpose.
In accordance with the above two approaches, by mechanical means or exposing-time control, the images captured by the CCD when the digital camera is subject to vibration will not become blurred. In views of complexity and cost, the above two anti-vibration approaches are not feasible for the digital camera of a handheld device such as a mobile phone or a personal digital assistant (PDA). Under this circumstance, another processing method is required to process the blur image captured by the CCD of the digital camera of the handheld device into a sharp image.
FIG. 1A schematically illustrates a model of an image degradation/restoration process. A sharp image f(x,y) undergoes a degradation process to produce a blur image g(x,y). If the degradation function h(x,y) is a linear spatially invariant process and η(x,y) is noise, the blur image g(x,y) is given in the spatial domain by:g(x,y)=h(x,y))(x,y)+η(x,y)  (1)where the symbol  indicates convolution integration.
Via Fourier transformation, the equation (1) is given in the frequency domain by:G(u,v)=H(u,v)F(u,v)+N(u,v)  (2)where N(u,v) denotes the Fourier transformation of the noise, and the degradation function H(u,v) denotes an optical transfer function (OTF) in the frequency domain. The degradation function h(x,y) in the spatial domain is also referred as a point spread function (PSF). The point spread function (PSF) describes the response of h(x,y) to a point source so as to achieve the degradation process of any object.
FIG. 1B schematically illustrates a degradation process of an object. In a case that the noise is negligible in the spatial domain, a blur image 30 is the convolution of an object 10 and a point spread function 20.
When the degradation process of FIG. 1B is applied to a digital camera, the sharp image f(x,y) denotes the object to be shot and the point spread function h(x,y) denotes vibration of the digital camera. The blur image g(x,y) captured by the CCD corresponds to the convolution of f(x,y) and h(x,y) and the additive noise q(x,y). By means of the restoration filter shown in FIG. 1A, the blur image g(x,y) undergoes the restoration process so as to be restored to a sharp image {circumflex over (f)}(x,y).
In a very simple manner, a direct inverse filter is used as a restoration filter to recover the sharp image from the blur image. That is, the equation (2) is divided by the degradation function H(u,v) in the frequency domain and expressed by:
                                          F            ^                    ⁡                      (                          u              ,              v                        )                          =                              F            ⁡                          (                              u                ,                v                            )                                +                                                    N                ⁡                                  (                                      u                    ,                    v                                    )                                                            H                ⁡                                  (                                      u                    ,                    v                                    )                                                      .                                              (        3        )            
The use of the direct inverse filter, however, still has a drawback. In a case the degradation function H(u,v) approaches zero, the noise is enlarged. Accordingly, the direct inverse filter is not feasible for image restoration.
As known, a Lucy-Richardson (LR) algorithm works surprisingly well when applied to the restoration filter. After a point spread function is obtained, the LR algorithm is performed to recover the sharp image from the blur image. Since the computation amount for the LR algorithm is very huge, even the state-of-the-art desktop computer processor takes about ten minutes or more to implement the LR algorithm. As a result, the LR algorithm is not feasible to be used in the handheld device.
In 1942, a Wiener filter was proposed for recovering the sharp image from the blur image. The purpose of the Wiener filter is to find the minimum mean square error on the basis of a statistical approach. The minimum mean square error of the output sharp image {circumflex over (f)}(x,y) is expressed by:e2=E{(f−{circumflex over (f)})2}  (4)where E is an expected value of the squared error, and f is the original image (object).
The solution of the equation is expressed by:
                                          F            ^                    ⁡                      (                          u              ,              v                        )                          =                              [                                          1                                  H                  ⁡                                      (                                          u                      ,                      v                                        )                                                              ⁢                                                |                                      H                    ⁡                                          (                                              u                        ,                        v                                            )                                                        ⁢                                      |                    2                                                                    |                                      H                    ⁡                                          (                                              u                        ,                        v                                            )                                                        ⁢                                      |                    2                                    ⁢                                                            +                                                                        S                          η                                                ⁡                                                  (                                                      u                            ,                            v                                                    )                                                                                      /                                                                  S                        f                                            ⁡                                              (                                                  u                          ,                          v                                                )                                                                                                                  ]                    ⁢                      G            ⁡                          (                              u                ,                v                            )                                                          (        5        )            where degradation function H(u,v) denotes the Fourier transformation of the point spread function, Sη(x,y) is a power spectrum of the noise, Sf(u,v) is a power spectrum of the original image (object). Since the computation amount for the Wiener filter is relatively small, the Wiener filter is feasible to be used in the handheld device.
Generally, the quality of the output sharp image {circumflex over (f)}(x,y) is dependent on the type of the restoration filter. For the handheld device, the ability of detecting the point spread function h(x,y) may also influence the quality of the output sharp image {circumflex over (f)}(x,y). In other words, the mobile phone should have the ability of detecting vibration of the mobile phone and detecting the point spread function h(x,y) in order to implement the anti-vibration function of a digital camera. Under this circumstance, the point spread function is also referred as a blur kernel.
Conventionally, the handheld device has a G sensor for detecting the point spread function. During operation of the digital camera of the handheld device, the G sensor may sense the gravity change. The gravity change is integrated to compute the real displacement and obtain the point spread function. Afterwards, a sharp image is recovered from the blur image by means of the processor of the handheld device and the restoration filter. The G sensor, however, increases the fabricating cost of the handheld device.
Therefore, there is a need of providing a blur image adjusting method to obviate the drawbacks encountered from the prior art.